{% extends "base.html" %}

{% block content %}

<div id="trade_cont">
<div id="give" class="box_bg">
<a href="/profiler/private?res_type=5"><img src="/profiler/getimage?account_key={{offer.owner.key}}" height="60px"/></a>
<div class="trans-title"><h1 class="title">{{offer.owner.user}}:GIVE</h1></div><br /><hr /><br />
<table>
<tr>
<td>Minerals</td><td align="right" width="80%">x{{offer.give_resOne}}</td>
</tr>
<tr>
<td>Water</td><td align="right" width="80%">x{{offer.give_resTwo}}</td>
</tr>
<tr>
<td>Fuel</td><td align="right" width="80%">x{{offer.give_resThree}}</td>
</tr>
<tr>
<td>Organic</td><td align="right" width="80%">x{{offer.give_resFour}}</td>
</tr>
<tr>
<td>Colony Ship</td><td align="right" width="80%">x{{offer.give_colonyShips}}</td>
</tr>
<tr>
<td>Recycler</td><td align="right" width="80%">x{{offer.give_recyclerShips}}</td>
</tr>
<tr>
<td>Freighter</td><td align="right" width="80%">x{{offer.give_freighterShips}}</td>
</tr>
</table>
</div>
<div id="take" class="box_bg">
<a href="/profiler/public?account_key={{recipAccount.key}}"><img src="/profiler/getimage?account_key={{recipAccount.key}}" height="60px" /></a>
<div class="trans-title"><h1 class="title">YOU :GIVE</h1></div><br /><hr /><br />
<table>
<tr>
<td>Minerals</td><td align="right" width="80%">x{{offer.take_resOne}}</td>
</tr>
<tr>
<td>Water</td><td align="right" width="80%">x{{offer.take_resTwo}}</td>
</tr>
<tr>
<td>Fuel</td><td align="right" width="80%">x{{offer.take_resThree}}</td>
</tr>
<tr>
<td>Organic</td><td align="right" width="80%">x{{offer.take_resFour}}</td>
</tr>
<tr>
<td>Colony Ship</td><td align="right" width="80%">x{{offer.take_colonyShips}}</td>
</tr>
<tr>
<td>Recycler</td><td align="right" width="80%">x{{offer.take_recyclerShips}}</td>
</tr>
<tr>
<td>Freighter</td><td align="right" width="80%">x{{offer.take_freighterShips}}</td>
</tr>
</table>
</div>

<div id="final" class="box_bg">
<h1 class="title"> PLANET : {{offer.location.name}}</h1><br /><br />
<div id="message">
{{offer.message}}
</div>
<br>
{% if offer_acceptable %}
    <span style="display: inline-block; text-align: center; width: 15%;" class="green-button" onclick="window.location='/trade/accept_offer?offer_key={{offer.key}}'">ACCEPT</span>&nbsp;
    <span style="display: inline-block; text-align: center; width: 15%;" class="red-button" onclick="window.location='/trade/reject_offer?offer_key={{offer.key}}'">REJECT</span>
{% else %}
    <span style="color:red;"<p>{{status_message}}</p></span>
    <span style="display: inline-block; text-align: center; width: 15%;" class="green-button" onclick="window.location='/profiler/private?res_type=5'">RETURN</span>
    <span style="display: inline-block; text-align: center; width: 15%;" class="red-button" onclick="window.location='/trade/reject_offer?offer_key={{offer.key}}'">REJECT</span>
{% endif %}

    </div>
    </div>
    </div>
{% endblock %}